import request from '@/utils/request'
// 权限管理-根据ID更新权限点详情
export const updatePermission = data => {
  return request({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}
// 权限管理-根据ID获取权限点详情
export const getPermissionDetail = id => {
  return request({
    url: `/sys/permission/${id}`
  })
}
// 权限管理-根据ID删除权限点
export const removePermission = id => {
  return request({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}
// 权限管理-添加权限点
export const addPermission = data => {
  return request({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
// 权限管理-获取所有权限点
export const getPermissionList = () => {
  return request({
    url: '/sys/permission'
  })
}
